package test1;

public class Book extends Author{
	String name;
	Author anthor;
	Double price;
	int qty = 0;
	public Book(String name,Author anthor,Double price,int qty){
		this.name = name;
		this.anthor = anthor;
		this.price = price;
		this.qty = qty;
	}
	public Book(String name ,Author anthor,Double price){
		this.name = name;
		this.anthor = anthor;
		this.price = price;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public int getQty() {
		return qty;
	}
	public void setQty(int qty) {
		this.qty = qty;
	}
	public String getName() {
		return name;
	}
	public Author getAnthor() {
		return anthor;
	}
	public String toString (){
		return "Book[name"+getName()+"Author:"+super.name+getEmail()+getGender()+"]"+getPrice()+getQty();
	}
}
